package com.training.java.core.collections.cellPhone.post15;

public class CellPhone {
	
	private String make;
	private String model;
	private String operatingSystem;
	
	
	public CellPhone(String make, String model, String operatingSystem)
	{
		this.make = make;
		this.model = model;
		this.operatingSystem = operatingSystem;
		
	}

	public String getMake() {
		return make;
	}

	public String getModel() {
		return model;
	}

	public String getOperatingSystem() {
		return operatingSystem;
	}

	@Override
	public boolean equals(Object obj) {

		CellPhone that = (CellPhone) obj;
		if(this.getMake().equals(that.getMake()) && this.getModel().equals(that.getModel())
				&& this.getOperatingSystem().equals(that.getOperatingSystem()))
		   return true;
		else
			return false;
	}
	
	@Override
	public int hashCode() {
		return (this.getMake().hashCode()); 
	}

}
